package xyz.xuminghai.javafx_learn.scene.shape;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.BorderPane;
import javafx.scene.shape.Line;
import javafx.stage.Stage;

/**
 * 2023/8/4 19:52 星期五<br/>
 * 此 Line 表示(x,y)坐标空间中的一条线段。
 *
 * @author xuMingHai
 */
public class LineApp extends Application {

    private final BorderPane root = new BorderPane();


    public static void main(String[] args) {
        Application.launch(args);
    }

    @Override
    public void init() {
        Line line = new Line(0.0, 0.0, 100.0, 0.0);
        root.setCenter(line);
    }

    public void start(Stage primaryStage) {
        primaryStage.setTitle(getClass().getSimpleName());
        Scene scene = new Scene(root, 800, 600);
        primaryStage.setScene(scene);
        primaryStage.show();
    }

}
